package com.sajhasite.transaction;

import bitronix.tm.Configuration;
import bitronix.tm.TransactionManagerServices;

import com.sajhasite.system.SystemException;

public class BTMTransactionManagerLookup extends org.hibernate.transaction.BTMTransactionManagerLookup {
	
	@Override
	public String getUserTransactionName() {
		try {		
			Configuration configuration = TransactionManagerServices.getConfiguration();
			String jndiUserTransactionName = configuration.getJndiUserTransactionName();			
			return jndiUserTransactionName;
		} catch (Exception e) {
			throw new SystemException("Could not obtain BTM UserTransactionName", e);
		}
	}
}
